# -*- coding: utf-8 -*-
# @Time: 2021/11/5 12:55
# @Author: jiuwu
# @Email: 2359196586@qq.com
# @File: urls.py
# @Software: PyCharm
from django.urls import path
from rest_framework_jwt.views import obtain_jwt_token
from .views import ImageVerifyView, UserViewSet, AreaViewSet,AddressViewSet
from rest_framework.routers import DefaultRouter

urlpatterns = [
    path('login/', obtain_jwt_token),
    path('image/verification/<uuid>/', ImageVerifyView.as_view()),
]
router = DefaultRouter()
router.register('users', UserViewSet)
router.register('area', AreaViewSet, basename='area')  # basename等于对应的模型类，当视图没有设置queryset时路由要设置basename
router.register('address', AddressViewSet, basename='address')  # basename等于对应的模型类小写
urlpatterns += router.urls
